﻿@model UserSettingModel
@{
    ViewData["Title"] = "定时提醒";
}

<section id="content-wrap" class="site-page">
    <div class="row">
        <div class="col-twelve">

            <div class="respond">

                <h3>定时提醒</h3>
                <fieldset>
                    <form asp-action="Setting" asp-controller="User" method="post">
                        <div class="form-field">
                            <label for="time">时间 （<i class="fa fa-bell"></i> 可以单选）</label>
                            <ul class="dowebok">
                                @for (int i = 6; i <= 21; i++)
                                {
                                    <li><input type="radio" @(Model.Time == i.ToString() ? "checked" : "") name="time" data-labelauty="@i:00" value="@i"></li>
                                }
                            </ul>
                        </div>
                        <div class="form-field">
                            <label for="weeks">重复 （<i class="fa fa-bell"></i> 可以多选）</label>
                            <ul class="dowebok">
                                @foreach (var item in Model.CBWeeks)
                                {
                                    <li><input type="checkbox" @(Model.Weeks.Contains(item.Key) ? "checked" : "") name="weeks" data-labelauty="@item.Value" value="@item.Key" /></li>
                                }
                            </ul>
                        </div>
                        <button type="submit" class="submit button-primary">保存</button>
                    </form>
                </fieldset>

            </div> <!-- Respond End -->
        </div>
    </div>
</section>
@section styles{
    <link href="~/css/jquery-labelauty.css" rel="stylesheet" />
    <style>
        ul {
            list-style-type: none;
        }

        li {
            display: inline-block;
        }

        li {
            margin: 10px 0;
        }

        input.labelauty + label {
            font: 12px "Microsoft Yahei";
        }
    </style>
}

@section scripts{
    <script src="~/js/jquery-labelauty.js"></script>
    <script>
        $(function () {
            $(':input').labelauty();
        });
    </script>
}